<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>

<div class="container" id="page">

	<div id="header">
		<div id="logo"><?php echo CHtml::encode(Yii::app()->name); ?></div>
	</div><!-- header -->

	<div id="mainmenu">
		<?php
                $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'Home', 'url'=>array('/site/index')),
				array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
				array('label'=>'Contact', 'url'=>array('/site/contact')),
				array('url'=>array('/site/login'),  'label'=>'Login', 'visible'=>Yii::app()->user->isGuest),
				array('url'=>Yii::app()->getModule('user')->loginUrl, 'label'=>Yii::app()->getModule('user')->t("Login"), 'visible'=>Yii::app()->user->isGuest),
				array('url'=>Yii::app()->getModule('user')->registrationUrl, 'label'=>Yii::app()->getModule('user')->t("Register"), 'visible'=>Yii::app()->user->isGuest),
				array('url'=>Yii::app()->getModule('user')->profileUrl, 'label'=>Yii::app()->getModule('user')->t("Profile"), 'visible'=>!Yii::app()->user->isGuest),
				array('url'=>Yii::app()->getModule('user')->logoutUrl, 'label'=>Yii::app()->getModule('user')->t("Logout").' ('.Yii::app()->user->name.')', 'visible'=>!Yii::app()->user->isGuest),
			),
		)); 
                ?>
	</div><!-- mainmenu -->

	<?php $this->widget('zii.widgets.CBreadcrumbs', array(
		'links'=>$this->breadcrumbs,
	)); ?><!-- breadcrumbs -->

	<?php echo $content; ?>

	<div id="footer">
		Copyright &copy; <?php echo date('Y'); ?> by My Company.<br/>
		All Rights Reserved.<br/>
		<?php echo Yii::powered(); ?>
	</div><!-- footer -->

</div><!-- page -->
<?php
$this->widget('application.extensions.cvisualizewidget.CVisualizeWidget',array(
    'data'=>array(
        'headings'=>array(
            'January',
            'February',
            'March',
            'April',
            'May',
            'June',
            'July',
            'August',
            'September',
            'October',
            'November',
            'December'
        ),
        'data'=>array(
            'Hits' => array(4,8,25,56,23,78),
            'Visits' => array(2,6,3,14,56,78),
            'Downloads'=>array(12,4,15,99,4.99)
        )
    ),
    'options' => array(
        'title'=>'Sample Data',
        'width'=>950,
        'height'=>250
    )
));
?>
<?php 

//	$this->widget('application.extensions.mbmenu.MbMenu',array(
//            'items'=>array(
//                array('label'=>'Home', 'url'=>array('/site/index')),
//                array('label'=>'Contact', 'url'=>array('/site/contact'),
//                  'items'=>array(
//                    array('label'=>'sub 1 contact'),
//                    array('label'=>'sub 2 contact'),
//                  ),
//                ),
//                array('label'=>'Test',
//                  'items'=>array(
//                    array('label'=>'Sub 1', 'url'=>array('/site/page','view'=>'sub1')),
//                    array('label'=>'Sub 2',
//                      'items'=>array(
//                        array('label'=>'Sub sub 1', 'url'=>array('/site/page','view'=>'subsub1')),
//                        array('label'=>'Sub sub 2', 'url'=>array('/site/page','view'=>'subsub2')),
//                      ),
//                    ),
//                  ),
//                ),
//            ),
//    ));
?>


<?php
 
?>
<?php
//Yii::import('ext.gmaps.*');
//$gMap = new EGMap();
//$gMap->setCenter(51.245475,6.821373);
//$gMap->addMarker(new EGMapMarker(51.245475,6.821373));
//$gMap->addMarker(new EGMapMarker(46.262248,6.115969));
//$gMap->setZoom(4);
//$gMap->renderMap();




//$this->Widget('ext.highcharts.HighchartsWidget', array(
   //'options'=>array(
      //'title' => array('text' => 'Fruit Consumption'),
      //'xAxis' => array(
         //'categories' => array('Apples', 'Bananas', 'Oranges')
      //),
      //'yAxis' => array(
         //'title' => array('text' => 'Fruit eaten')
      //),
      //'series' => array(
         //array('name' => 'Jane', 'data' => array(1, 0, 4)),
         //array('name' => 'John', 'data' => array(5, 7, 3))
      //)
   //)
//));
?>

<?php
//$place = 'brisbane,qld';
//$data = Yii::app()->CURL->run('http://www.google.com/ig/api?weather='.$place.'&hl=en');
 
//$xml = new SimplexmlElement($data);
        //foreach($xml->weather as $item) {
 
                //foreach($item->current_conditions as $new) {
 
                        ////For temperature in fahrenheit replace temp_c by temp_f
                        //$current_temperature=$new->temp_c['data'];
                        //$current_humidity=$new->humidity['data'];
                //}
 
                //$current_condition=$item->forecast_conditions[0]->condition['data'];           
                //$next_temperature=$item->forecast_conditions[1]->high['data'];
 
                ////to convert Fahrenheit into Celcius
                //$next_temperature=round(($next_temperature-32)*(5/9));
 
                //$next_condition=$item->forecast_conditions[1]->condition['data'];
        //}  
 
//echo " Current temperature :".$current_temperature."<br />"; 
//echo "Current condition : ".$current_condition."<br />";
//echo $current_humidity; 
//echo "Tomorrows temperature :".$next_temperature."<br />"; 
//echo "Tomorrows condition : ".$next_condition."<br />";
?>
<?php
//$email = Yii::app()->email;
//$email->to = 'jianjian19841984@gmail.com';
//$email->subject = 'Hello';
//$email->message = 'Hello brother';
//$email->send();
?>
<?php
            //$this->widget('application.components.widgets.XHeditor',array(
                //'language'=>'en', //options are en, zh-cn, zh-tw
                //'config'=>array(
                    //'id'=>'xh1',
                    //'name'=>'xh',
                    //'tools'=>'mini', // mini, simple, fill or from XHeditor::$_tools
                    //'width'=>'100%',
                    ////see XHeditor::$_configurableAttributes for more
                //),
                //'contentValue'=>'Enter your text here', // default value displayed in textarea/wysiwyg editor field
                //'htmlOptions'=>array('rows'=>5, 'cols'=>10),// to be applied to textarea
            //));
            //?>
 
            <?php
            //$this->widget('application.components.widgets.XHeditor',array(
                //'model'=>$modelInstance,
                //'modelAttribute'=>'attribute',
                //'showModelAttributeValue'=>false, // defaults to true, displays the value of $modelInstance->attribute in the textarea
                //'config'=>array(
                    //'id'=>'xh1',
                    //'name'=>'xh',
                    //'tools'=>'mini', // mini, simple, fill or from XHeditor::$_tools
                    //'width'=>'100%',
                    ////see XHeditor::$_configurableAttributes for more
                //),
            //));
            ?>


<?php 
				
//$this->widget('application.components.widgets.WGoogleStaticMap',array(
    //'center'=>'52.3214,2.34403', // Or you can use text eg. Dundee, Scotland
    //'alt'=>"Map for location of something", // Alt text for image (optional)
    //'zoom'=>0, // Google map zoom level
    //'width'=>250, // image width
    //'height'=>250, // image Height
    //'markers'=>array(
        //array(
            //'style'=>array('color'=>'green'),
            //'locations'=>array('Dundee, UK','Sydney, Australia'), // Or use lat/long pairs
        //),
        //array(
            //'style'=>array('color'=>'blue','label'=>'X'),
            //'locations'=>array('52.433432,-100.34322'),
        //),
    //),
    //'linkUrl'=>array('location/view'), // Where the image should link (optional)
    //'linkOptions'=>array('target'=>'_blank'), // HTML options for link tag (optional)
    //'imageOptions'=>array('class'=>'map-image'), // HTML options for img tag (optional)
//));
				//$this->widget('application.extensions.tinymce.ETinyMce',array('editorTemplate'=>'full', 'name' => 'test'));
?>

<?php $this->widget('application.extensions.addThis'); ?>



<?php 
//$this->widget('application.extensions.CDropDownMenu',
		//array(
			//'items'=>array(
				//array('label'=>'File', 'url'=>'#', 'items' => array(array('label' => 'Open'))),
				//array('label'=>'Projects', 'url'=>array('/project/admin'), 'visible'=>!Yii::app()->user->isGuest),
				//array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
				//array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
      //),
    //));
?>

<?php
//Yii::import('application.extensions.phpmailer.JPhpMailer');
//$mail = new JPhpMailer;
//$mail->IsSMTP();
//$mail->Host = 'smpt.163.com';
//$mail->SMTPAuth = true;
//$mail->Username = 'yourname@163.com';
//$mail->Password = 'yourpassword';
//$mail->SetFrom('yourname@163.com', 'yourname');
//$mail->Subject = 'PHPMailer Test Subject via smtp, basic with authentication';
//$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
//$mail->MsgHTML('<h1>JUST A TEST!</h1>');
//$mail->AddAddress('john.doe@otherdomain.com', 'John Doe');
//$mail->Send();
			$browser = Yii::app()->browser->getBrowser();
$platform = Yii::app()->browser->getPlatform();
echo $browser;
echo $platform;
?>
<?php $this->beginWidget('ext.scrollingnews.ScrollingNews', array('scriptOptions'=>array('visible'=>2))); ?>
                <ul>
                  <li>item 1</li>
                  <li>item 2</li>
                  <li>item 3</li>
                </ul>
<?php $this->endWidget(); ?>


<?php $this->beginWidget('ext.ECheckBoxTree.ECheckBoxTree') ?>
    <li><input type="checkbox"/>Root
    <ul>
        <li><input type="checkbox"/>Node 1
        <ul>
        <li><input type="checkbox"/>Node 1.1
        </ul></li>
    </ul>
 
    <ul>
        <li><input type="checkbox"/>Node 2
        <ul>
        <li><input type="checkbox"/>Node 2.1</li>
        <li><input type="checkbox"/>Node 2.2</li>
        <li><input type="checkbox"/>Node 2.3</li>
        <ul>
            <li><input type="checkbox"/>Node 2.3.1</li>
            <li><input type="checkbox"/>Node 2.3.2</li>
        </ul>
        <li><input type="checkbox"/>Node 2.4</li>
        <li><input type="checkbox"/>Node 2.5</li>
        <li><input type="checkbox"/>Node 2.6</li>
        </ul></li>
 
    </ul>
    </li>
<?php $this->endWidget() ?>
</body>
</html>
